package com.traffic.between.redis.running;

import org.apache.log4j.Logger;

import com.traffic.between.redis.Redis;
import com.traffic.between.util.DictConstantKeys;
import com.traffic.between.util.OrderUtils;
import com.traffic.managent.service.order.bean.OrderBean;

/**
 * 用于处理  bsm 订购后的订单
 * 放在队列，traffic里的FlowOrderResultWork会监听到。
 * @author Guoxing
 *
 */
public class BsmOrderResultExecutor implements OrderUtils {

	private static Logger logger = Logger.getLogger(BsmOrderResultExecutor.class);

	public final static BsmOrderResultExecutor service = new BsmOrderResultExecutor();

	public void setOrder(OrderBean order) {
		Redis.use(DictConstantKeys.redis_order_name).rpush(OrderUtils.ORDER_LIST_RESULT, order);
		logger.info("BsmOrderResultExecutor set to redis order id:" + order.getIds() + ",phoneNo:" + order.getPhoneNo()+"successful!!!" );
	}

}
